import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from "rxjs";

@Injectable({
  providedIn: 'root'
})
export class FinanceDrawbackService {

  serviceUrls: any = {
    drawbackListkUrl: '/userWalletRecord/drawbackList', // 退税管理list
    drawbackExamineUrl: '/userWalletRecord/examineDrawback', // 退税审核 | 打款
    drawbackDetailUrl: '/userWalletRecord/details', // 退税详情
    drawbackFlowUrl: '/userWalletRecord/flowList', // 退税流水
    followRecordUrl: '/follower/list', // 跟进记录
  }

  constructor(public httpClient: HttpClient) {}

  /**
   * 查询跟进记录
   * @param params 
   * @returns 
   */
  getFollowRecord(params: any) {
    return this.httpClient.post(this.serviceUrls.followRecordUrl, params).toPromise();
  }

  /**
   * 查询退税list
   * @param params 
   * @returns 
   */
  getDrwabackList(params: any) {
    return this.httpClient.post(this.serviceUrls.drawbackListkUrl, params).toPromise();
  }

  /**
   * 退税审核 | 打款
   * @param params 
   * @returns 
   */
  drawbackExaminePayment(params: any) {
    return this.httpClient.post(this.serviceUrls.drawbackExamineUrl, params).toPromise();
  }

  /**
   * 查询退税详情
   * @param params 
   * @returns 
   */
  getDrawbackDetail(params: any) {
    return this.httpClient.post(this.serviceUrls.drawbackDetailUrl, params).toPromise();
  }

  /**
   * 查询退税流水list
   * @param params 
   * @returns 
   */
  getDrawbackFlow(params: any) {
    return this.httpClient.post(this.serviceUrls.drawbackFlowUrl, params).toPromise();
  }
}



